<?php

namespace App\Models;

class EwNews extends BaseModel
{

    /**
     *
     * @var integer
     * @Primary
     * @Identity
     * @Column(type="integer", length=11, nullable=false)
     */
    public $id;

    /**
     *
     * @var string
     * @Column(type="string", length=120, nullable=true)
     */
    public $three_url;

    /**
     *
     * @var string
     * @Column(type="string", length=120, nullable=true)
     */
    public $ads_url;

    /**
     *
     * @var string
     * @Column(type="string", length=120, nullable=true)
     */
    public $ads_url_ios;

    /**
     *
     * @var integer
     * @Column(type="integer", length=11, nullable=true)
     */
    public $city_id;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=false)
     */
    public $title;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $tags;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $summary;

    /**
     *
     * @var string
     * @Column(type="string", length=128, nullable=true)
     */
    public $author;

    /**
     *
     * @var integer
     * @Column(type="integer", length=11, nullable=true)
     */
    public $cate_id;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $type_id;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $cont_type;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=true)
     */
    public $thumb;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $pics;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $album;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=true)
     */
    public $video;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=true)
     */
    public $duration;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $content;

    /**
     *
     * @var string
     * @Column(type="string", length=128, nullable=true)
     */
    public $sources;

    /**
     *
     * @var integer
     * @Column(type="integer", length=11, nullable=true)
     */
    public $visit;

    /**
     *
     * @var integer
     * @Column(type="integer", length=11, nullable=true)
     */
    public $comment;

    /**
     *
     * @var integer
     * @Column(type="integer", length=1, nullable=true)
     */
    public $is_display;

    /**
     *
     * @var integer
     * @Column(type="integer", length=1, nullable=true)
     */
    public $is_del;

    /**
     *
     * @var integer
     * @Column(type="integer", length=11, nullable=true)
     */
    public $order_by;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $reco_by;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $index_by;

    /**
     *
     * @var integer
     * @Column(type="integer", length=1, nullable=true)
     */
    public $is_self;

    /**
     *
     * @var string
     * @Column(type="string", nullable=false)
     */
    public $update_time;

    /**
     *
     * @var string
     * @Column(type="string", nullable=false)
     */
    public $create_time;

    
    /**
     *
     * @var integer
     * @Column(type="integer", length=1, nullable=true)
     */
    public $sub_type;


    /**
     * Returns table name mapped in the model.
     *
     * @return string
     */
    public function getSource()
    {
        return 'ew_news';
    }

    /**
     * Allows to query a set of records that match the specified conditions
     *
     * @param mixed $parameters
     * @return EwNews[]|EwNews
     */
    public static function find($parameters = null)
    {
        return parent::find($parameters);
    }

    /**
     * Allows to query the first record that match the specified conditions
     *
     * @param mixed $parameters
     * @return EwNews
     */
    public static function findFirst($parameters = null)
    {
        return parent::findFirst($parameters);
    }

}
